package cn.zjj.feignClient;

import cn.zjj.domain.Store;
import cn.zjj.feignClient.fallbackFactory.StoreFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(name = "store-server",fallbackFactory = StoreFallbackFactory.class)
@RequestMapping("/store")
public interface StoreFeignClient {

    @PostMapping("/add")
    Map<String,Object> add(@RequestBody Store store);

    @PutMapping("/update")
    Map<String,Object> update(@RequestBody Store store);

    @GetMapping("/selectById/{product_id}")
    Store selectById(@PathVariable("product_id") Long product_id);

}
